package org.sdp.pearproject.dto.convert;

import org.sdp.pearproject.dao.domain.*;
import org.sdp.pearproject.dto.request.*;
import java.util.Date;

/**
 * @ClassName: ProjectForMenuMenuRequestConvert
 * @Description:
 * @Author: SDP
 * @Date: 2022-07-21
 * @Version: 1.0
 * Table: pear_project
 * Comment:
 * 项目表
 */
public class ProjectForMenuMenuRequestConvert extends BaseConvert {
    public static ProjectForMenuMenu convert(ProjectForMenuMenuRequest request) throws Exception {
        ProjectForMenuMenu daoRequest = new ProjectForMenuMenu();
        copyProperties(request, daoRequest);

        daoRequest.setTitle(daoRequest.getTitle() == null ? null : daoRequest.getTitle().trim());
        daoRequest.setIcon(daoRequest.getIcon() == null ? null : daoRequest.getIcon().trim());
        daoRequest.setUrl(daoRequest.getUrl() == null ? null : daoRequest.getUrl().trim());
        daoRequest.setFilePath(daoRequest.getFilePath() == null ? null : daoRequest.getFilePath().trim());
        daoRequest.setParams(daoRequest.getParams() == null ? null : daoRequest.getParams().trim());
        daoRequest.setNode(daoRequest.getNode() == null ? null : daoRequest.getNode().trim());
        daoRequest.setCreateAt(daoRequest.getCreateAt() == null ? null : daoRequest.getCreateAt().trim());
        daoRequest.setValues(daoRequest.getValues() == null ? null : daoRequest.getValues().trim());
        daoRequest.setFullUrl(daoRequest.getFullUrl() == null ? null : daoRequest.getFullUrl().trim());

        return daoRequest;
    }
}
